/**
 * gpms
 * 2012-8-1 上午10:50:35
 * 作者：陈志明
 * 
 */
package com.gpms.common.action;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.util.ServletContextAware;

import com.gpms.privilege.service.*;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Jackie chen
 *
 */
public class BaseActionSupport extends ActionSupport implements ServletRequestAware,ServletResponseAware,ServletContextAware{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1011629783291842217L;
	public ServletContext context;
	public HttpServletResponse response;
	public HttpServletRequest request;
	
	public UserService userService;
	public RoleService roleService;
	public GroupService groupService;
	public ModuleService moduleService;
	public ItemService itemService;
	public ItemDetailsService itemDetailsService;
	
	/* (non-Javadoc)
	 * @see org.apache.struts2.util.ServletContextAware#setServletContext(javax.servlet.ServletContext)
	 */
	@Override
	public void setServletContext(ServletContext context) {
		// TODO Auto-generated method stub
		this.context=context;
		
	}
	/* (non-Javadoc)
	 * @see org.apache.struts2.interceptor.ServletResponseAware#setServletResponse(javax.servlet.http.HttpServletResponse)
	 */
	@Override
	public void setServletResponse(HttpServletResponse response) {
		// TODO Auto-generated method stub
		this.response=response;
		
	}
	/* (non-Javadoc)
	 * @see org.apache.struts2.interceptor.ServletRequestAware#setServletRequest(javax.servlet.http.HttpServletRequest)
	 */
	@Override
	public void setServletRequest(HttpServletRequest request) {
		// TODO Auto-generated method stub
		this.request=request;
	}
	
	
	/**
	 * @return the userService
	 */
	public UserService getUserService() {
		return userService;
	}
	/**
	 * @param userService the userService to set
	 */
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	/**
	 * @return the roleService
	 */
	public RoleService getRoleService() {
		return roleService;
	}
	/**
	 * @param roleService the roleService to set
	 */
	public void setRoleService(RoleService roleService) {
		this.roleService = roleService;
	}
	/**
	 * @return the groupService
	 */
	public GroupService getGroupService() {
		return groupService;
	}
	/**
	 * @param groupService the groupService to set
	 */
	public void setGroupService(GroupService groupService) {
		this.groupService = groupService;
	}
	/**
	 * @return the moduleService
	 */
	public ModuleService getModuleService() {
		return moduleService;
	}
	/**
	 * @param moduleService the moduleService to set
	 */
	public void setModuleService(ModuleService moduleService) {
		this.moduleService = moduleService;
	}
	/**
	 * @return the itemService
	 */
	public ItemService getItemService() {
		return itemService;
	}
	/**
	 * @param itemService the itemService to set
	 */
	public void setItemService(ItemService itemService) {
		this.itemService = itemService;
	}
	/**
	 * @return the itemDetailsService
	 */
	public ItemDetailsService getItemDetailsService() {
		return itemDetailsService;
	}
	/**
	 * @param itemDetailsService the itemDetailsService to set
	 */
	public void setItemDetailsService(ItemDetailsService itemDetailsService) {
		this.itemDetailsService = itemDetailsService;
	}
	
}
